Covid Cases within the States
download.file("https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_confirmed_US.csv", "time_series_covid19_confirmed_US.csv", method="libcurl", timeout = 60)
covidGithub <- data.table::fread("time_series_covid19_confirmed_US.csv")
Incidence Cases Across the Pandemic
p1<-ggplot(covidGithubmelt, aes(Date, new_cases, color = county))+
geom_line()+
geom_point(size = .5, alpha = 0.5)+
labs(title = 'Incidences of Covid Cases in California by County', y = 'New cases', color = 'County')
ggplotly(p1, width = 800)
Incidence Cases
incidence <- plot_usmap(data = mapdf, values='new_cases', include = 'CA')+
scale_fill_continuous(low = 'white', high = 'red', name = 'Confirmed Cases', label = scales::comma)+
labs(title = 'Incidence Cases by California County',
subtitle = 'Source: Johns Hopkins University Center for Systems Science and Engineering (JHU CSSE)',
caption = paste('As of ', as.Date(max(mapdf$Date))))+
theme(plot.title = element_text(hjust = 0.5, vjust = 0.25, size = 18), legend.position = "right",
legend.title = element_text(size = 14), legend.text = element_text(size = 12))
Total Confirmed Cases
prevalence <- plot_usmap(data = mapdf, values='Confirmed', include = 'CA')+
scale_fill_continuous(low = 'white', high = 'red', name = 'Confirmed Cases', label = scales::comma)+
labs(title = 'Total Cases in California by County',
subtitle = 'Source: Johns Hopkins University Center for Systems Science and Engineering (JHU CSSE)',
caption = paste('As of ', as.Date(max(mapdf$Date))))+
theme(plot.title = element_text(hjust = 0.5, vjust = 0.25, size = 18), legend.position = "right",
legend.title = element_text(size = 14), legend.text = element_text(size = 12))
Exploration of Covid Cases within California
US Census data of California
CAcensus <- read_csv("data/cc-est2019-alldata-06.csv")
County Populations Within California
plot_usmap(data = Popmapdf, values='TOT_POP', include = 'CA')+
scale_fill_continuous(low = 'white', high = 'blue', name = 'Population', label = scales::comma)+
labs(title = '2019 County Population Estimates', subtitle = 'Source: US Census')+
theme(plot.title = element_text(hjust = 0.5, vjust = 0.25, size = 18), legend.position = "right",
legend.title = element_text(size = 14), legend.text = element_text(size = 12))

Running Total of Confirmed Cases by Population of Counties
# Adding hoverinfo
cvd_pop%>%
plot_ly(x = ~TOT_POP, y = ~Confirmed,
type = 'scatter', mode = 'markers', color = ~county,
size = ~TOT_POP, sizes = c(5, 70), marker = list(sizemode='diameter', opacity=0.5),
hoverinfo = 'text',
text = ~paste( paste(county, ":", sep=""), paste(" Cases per 100k: ", per100k, sep=""),
paste(' Population: ', TOT_POP, sep=""), sep = "<br>"),
width = 800)%>%
layout(title = "Covid Cases vs Population of Each County",
yaxis = list(title = "Cases per 100k"), xaxis = list(title = "Population"))
Enviornmental Protection Agency (EPA) Air Quality Index
# Daily AQI for every county in California
csvAQI_data <- read_csv("data/ad_viz_plotval_data.csv")
Air Quality Within California
AQI%>%
plot_ly(x = ~COUNTY, y = ~MeanAQI, type = 'box', color = ~COUNTY, width = 800)%>%
layout(title = 'Air Quality by California County', yaxis = list(title = 'AQI Value'),
xaxis = list(title = 'County'))